local opts = {
	noremap = true,
	silent = true,
}



vim.keymap.set('i', 'jj', '<esc>', opts)
vim.keymap.set('i', 'jo', '<esc>o', opts)
vim.keymap.set('i', 'jw', '<esc>:w<CR>', opts)

vim.keymap.set('n', 'U', ':redo<CR>', opts)
vim.keymap.set('n', '<Leader>d', 'dd', opts)

vim.g.encoding = "UTF-8"
vim.o.fileencoding = "UTF-8"

vim.g.mapleader = ','
vim.g.maplocalleader = ','


local map = vim.api.nvim_set_keymap -- 创建一个函数变量map，用于设置按键映射
 
-- 将leader键设置为空格键
vim.g.mapleader = ","
 
-- 设置leader键+s作为保存当前文件的快捷键
map("", "<leader>s", ":w<CR>", { noremap = true })
map("", "<leader>q", ":q!<CR>", { noremap = true })
